//
//  JKTestView.swift
//  JKTest
//
//  Created by IronMan on 2020/9/7.
//  Copyright © 2020 Creditease. All rights reserved.
//

import UIKit
protocol JKTestViewDelegate: class {
    /// 创建控件
    func testMethod()
}
typealias JKBlock = () -> ()
class JKTestView: UIView {

    var clickBlock: JKBlock?
    weak var delegate:JKTestViewDelegate?
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setUI()
        self.backgroundColor = .yellow
    
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        JKPrint("-----测试-----")
        clickBlock?()
        delegate?.testMethod()
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setUI() {
        
    }
}
